/**
 * 1
 *  
 * @Author : roryrywang
 * @DateTime : 24-8-24 上午9:51
 */

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    long long a, b, c, d;
    int n;
    cin >> a >> b >> c >> d >> n;
    long long minValue = 0;
    long long minX = 0;
    long long minY = 0;
    long long res = 0;
    long long dis2 = abs(a - c) + abs(b - d) ;
    for (int i = 0; i < n; ++i) {
        long long x, y;
        cin >> x >> y;

        long long dis = abs(a - x) + abs(b - y) + abs(c - x) + abs(d - y);
        if (i == 0) {
            minX = x;
            minY = y;
            minValue = dis;
        } else {
            if (dis < minValue) {
                minX = x;
                minY = y;
                minValue = dis;
            }
        }
        res += 2 * (abs(c - x) + abs(d - y));
    }
    if (dis2>minValue){
        res -= 2 * (abs(c - minX) + abs(d - minY));
        res += minValue;
    }else{
        res+=dis2;
    }

    cout << res;
    return 0;
}
//5 5 4 4
//2
//2 2
//0 0
